#!/bin/bash


#pwd

wget -P /root/ldz/pack -c  https://nginx.org/download/nginx-1.26.1.tar.gz


tar -xzvf /root/ldz/pack/nginx-1.26.1.tar.gz -C /usr/local





yum install gcc gcc-c++ pcre pcre-devel zlib zlib-devel openssl openssl-devel  gd gd-devel GeoIP GeoIP-devel  libxml2 libxml2-devel libxslt-devel -y

useradd -M -s /sbin/nologin www

groupadd www

cd /usr/local/nginx-1.26.1

./configure --user=www --group=www --prefix=/usr/local/nginx --with-file-aio --with-http_ssl_module  --with-http_realip_module    --with-http_addition_module    --with-http_xslt_module   --with-http_image_filter_module  --with-http_geoip_module  --with-http_sub_module  --with-http_dav_module --with-http_flv_module    --with-http_mp4_module --with-http_gunzip_module  --with-http_gzip_static_module  --with-http_auth_request_module  --with-http_random_index_module   --with-http_secure_link_module   --with-http_degradation_module   --with-http_stub_status_module

make -j4

make -j4 install

ls -l /usr/local/nginx

/usr/local/nginx/sbin/nginx

ps -ef | grep nginx | grep -v grep







